
Rem
bbdoc: A game state template.
endrem
Type TGameState Abstract

	Field _game:TGame
	Field _id:Int
	Field _world:TWorld
	
	
	rem
	bbdoc: User hook for state update logic.
	endrem
	Method Update(delta:Double)
	End Method
	
	rem
	bbdoc: User hook for state render code.
	endrem
	Method Render(tween:Double)
	End Method

	
	Method SetId(id:Int)
		_id = id
	End Method	
	
	
	Rem
	bbdoc: Returns the ID of this state.
	endrem
	Method GetId:Int()
		Return _id
	End Method
		
	
	Method SetGame(g:TGame)
		_game = g
	End Method	
	
	
	rem
	bbdoc: Returns the game owning this state.
	endrem	
	Method GetGame:TGame()
		Return _game
	End Method
	

		
	Method SetWorld(w:TWorld)
		_world = w
	End Method
	
	
	Method GetWorld:TWorld()
		Return _world
	End Method

	
	Rem
	bbdoc: User hook for code when entering this state.
	endrem
	Method Enter()
	End Method
	
	
	Rem
	bbdoc: User hook for code when leaving this state.
	endrem
	Method Leave()
	End Method
	
	
	rem
	bbdoc: User hook for update code after state updating.
	endrem
	Method PostUpdate(delta:Double)
	End Method
	
	
	rem
	bbdoc: User hook for update code before state updating.
	endrem
	Method PreUpdate(delta:Double)
	End Method
	

	rem
	bbdoc: User hook for rendering after state rendering.
	endrem
	Method PostRender(tween:Double)
	End Method
	
	
	rem
	bbdoc: User hook for rendering before state rendering.
	endrem
	Method PreRender(tween:Double)
	End Method	
	
	
End Type